using System;
using SCRUMPoker;

public abstract class PresenterBase<T> where T : IView
{
    protected T View;

    public PresenterBase(T view)
    {
        View = view;
        RegisterEvents();
    }

    void RegisterEvents()
    {
        View.Init += delegate { Init(View.IsPostBack); };
        View.Load += delegate { Load(View.IsPostBack); };
    }

    protected virtual void Init(bool isPostBack)
    {
    }

    protected virtual void Load(bool isPostBack)
    {
    }
}
